package com.openstack4j.qx.imp;

import org.openstack4j.api.OSClient.OSClientV2;
import org.openstack4j.openstack.OSFactory;

import com.openstack4j.qx.BaseController;

/**
 * 接口实现父类 功能实现登录
 * 
 * @author liulin
 *
 */
public class BaseControllerImp implements BaseController {
	

	/**
	 * 登录
	 */
	@Override
	public OSClientV2 login() {
		
		try {
			OSClientV2 os = OSFactory.builderV2().endpoint("http://10.50.0.11:5000/v2.0")
					.credentials("admin", "ADMIN_PASS").tenantName("admin").authenticate();
			return os;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}
	
	
}
